from sklearn.preprocessing import LabelEncoder # 标签编码器
import pandas as pd

if __name__ == '__main__':
    s = pd.Series([7,3,5,4])
    encoder = LabelEncoder()
    y = encoder.fit_transform(s)
    print(y)